#ifndef _GDS_INCLUDED
#define _GDS_INCLUDED

#include "libgds.h"

/* Stream record types */
enum {
  GDSrecHEADER, GDSrecBGNLIB, GDSrecLIBNAME, GDSrecUNITS, GDSrecENDLIB,
  GDSrecBGNSTR, GDSrecSTRNAME, GDSrecENDSTR, GDSrecBOUNDARY, GDSrecPATH,
  GDSrecSREF, GDSrecAREF, GDSrecTEXT, GDSrecLAYER, GDSrecDATATYPE,
  GDSrecWIDTH, GDSrecXY, GDSrecENDEL, GDSrecSNAME, GDSrecCOLROW,
  GDSrecTEXTNODE, GDSrecNODE, GDSrecTEXTTYPE, GDSrecPRESENTATION,
  GDSrecSPACING, GDSrecSTRING, GDSrecSTRANS, GDSrecMAG, GDSrecANGLE,
  GDSrecUINTEGER, GDSrecUSTRING, GDSrecREFLIBS, GDSrecFONTS,
  GDSrecPATHTYPE, GDSrecGENERATIONS,  GDSrecATTRTABLE, GDSrecSTYPTABLE,
  GDSrecSTRTYPE, GDSrecELFLAGS, GDSrecELKEY,  GDSrecLINKTYPE,
  GDSrecLINKKEYS, GDSrecNODETYPE, GDSrecPROPATTR, GDSrecPROPVALUE,
  GDSrecBOX, GDSrecBOXTYPE, GDSrecPLEX,  GDSrecBGNEXTN, GDSrecENDEXTN,
  GDSrecTAPENUM, GDSrecTAPECODE, GDSrecSTRCLASS, GDSrecRESERVED,
  GDSrecFORMAT, GDSrecMASK, GDSrecENDMASKS, GDSrecLIBDIRSIZE,
  GDSrecSRFNAME, GDSrecLIBSECUR, GDSrecBORDER, GDSrecSOFTFENCE,
  GDSrecHARDFENCE, GDSrecSOFTWIRE, GDSrecHARDWIRE, GDSrecPATHPORT,
  GDSrecNODEPORT, GDSrecUSERCONSTRAINT, GDSrecSPACER_ERROR, GDSrecCONTACT
};

/* Stream data types */
enum {
  GDStypeNODATA,
  GDStypeBITARRAY,
  GDStypeINT16,
  GDStypeINT32,
  GDStypeREAL4, /* (not used) */
  GDStypeREAL8,
  GDStypeSTRING
};

void gds_layer(int n);
void gds_mskpolygon3(int l, double x0, double y0, double x1, double y1, double x2, double y2);
void gds_mskpolygon4(int l, double x0, double y0, double x1, double y1,
    double x2, double y2, double x3, double y3);
void gds_mskpolygonN(int l, double *x, double *y, int n);
void gds_mskarc(int l, double w, double x1, double y1, double x2,
    double y2, double x3, double y3);
void gds_mskarc2 (int l, double w, double r, double a1, double a2, double x1,
    double y1);
void gds_mskcircle(int l, double w, double x1, double y1, double x2, double y2);
void gds_mskpolystart(int l, double w);
void gds_mskpolypoint(int l, double x, double y);
void gds_mskpolygonend(int l);
void gds_mskpolyend(int l);
void gds_mskpolygonstart(int l);
void gds_msk_main_header(const char *filename);
void gds_msk_sublayout_header(const char *layout);
void gds_msk_sublayout_trailer();
void gds_msk_trailer();
void gds_mskline(int l, double w, double xb, double yb, double xe, double ye);
void gds_msklayout(const int layoutnr, const char *name, double a, double x,
    double y, int flip);
    
#endif /* _MASK_INCLUDED */
